package com.mapforge.io;

import java.io.File;
import java.util.HashSet;

public class AbstractIOExtensionHandler<T> implements IOHandlerInterface<T> {
	HashSet<String> extensions;

	public AbstractIOExtensionHandler(String... extensions) {
		this.extensions = new HashSet<String>(extensions.length);
		for (int i = 0; i < extensions.length; i++)
			this.extensions.add(extensions[i]);
	}

	private String getFileExtension(File file) {
		return "";
	}

	public boolean canLoad(File file) {
		return extensions.contains(getFileExtension(file));
	}

	public T read(File file) {
		return null;
	}

	public void write(T t, File file) {

	}
}
